using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace AlbumDownload
{
    public class SaveData
    {
        public bool SavaRex(string url1,string rex1,string url2,string rex2)
        {
            try
            {
                StreamWriter sw = new StreamWriter("data.db", true, Encoding.GetEncoding("gb2312"));
                sw.WriteLine(url1 + "|" + rex1 + "|" + url2 + "|" + rex2);
                sw.Close();
                return true;
            }
            catch (Exception)
            {
                return false;
            }
           
        }

        public string[] ReadRex()
        {
            StreamReader sr = new StreamReader("data.db", Encoding.GetEncoding("gb2312"));
            string rex=sr.ReadLine();
            string[] s = rex.Split('|');
            return s;
        }
    }
}
